package com.zz.parkingsystem.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 周末时间策略表
 * @TableName t_weekend
 */
@Data
public class Weekend implements Serializable {
    /**
     * 周末id
     */
    private Integer wedId;

    /**
     * 繁忙时间开始
     */
    private Date busyTimeStart;

    /**
     * 繁忙时间段结束
     */
    private Date busyTimeEnd;

    /**
     * 免费时长单位分钟
     */
    private Integer freeTime;

    /**
     * 繁忙收费标准金额，单位小时
     */
    private BigDecimal busyStandardAmount;

    /**
     * 非繁忙收费标准金额，单位小时
     */
    private BigDecimal notBusyStandardAmount;

    /**
     * 
     */
    private BigDecimal peakAmount;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Weekend other = (Weekend) that;
        return (this.getWedId() == null ? other.getWedId() == null : this.getWedId().equals(other.getWedId()))
            && (this.getBusyTimeStart() == null ? other.getBusyTimeStart() == null : this.getBusyTimeStart().equals(other.getBusyTimeStart()))
            && (this.getBusyTimeEnd() == null ? other.getBusyTimeEnd() == null : this.getBusyTimeEnd().equals(other.getBusyTimeEnd()))
            && (this.getFreeTime() == null ? other.getFreeTime() == null : this.getFreeTime().equals(other.getFreeTime()))
            && (this.getBusyStandardAmount() == null ? other.getBusyStandardAmount() == null : this.getBusyStandardAmount().equals(other.getBusyStandardAmount()))
            && (this.getNotBusyStandardAmount() == null ? other.getNotBusyStandardAmount() == null : this.getNotBusyStandardAmount().equals(other.getNotBusyStandardAmount()))
            && (this.getPeakAmount() == null ? other.getPeakAmount() == null : this.getPeakAmount().equals(other.getPeakAmount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getWedId() == null) ? 0 : getWedId().hashCode());
        result = prime * result + ((getBusyTimeStart() == null) ? 0 : getBusyTimeStart().hashCode());
        result = prime * result + ((getBusyTimeEnd() == null) ? 0 : getBusyTimeEnd().hashCode());
        result = prime * result + ((getFreeTime() == null) ? 0 : getFreeTime().hashCode());
        result = prime * result + ((getBusyStandardAmount() == null) ? 0 : getBusyStandardAmount().hashCode());
        result = prime * result + ((getNotBusyStandardAmount() == null) ? 0 : getNotBusyStandardAmount().hashCode());
        result = prime * result + ((getPeakAmount() == null) ? 0 : getPeakAmount().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", wedId=").append(wedId);
        sb.append(", busyTimeStart=").append(busyTimeStart);
        sb.append(", busyTimeEnd=").append(busyTimeEnd);
        sb.append(", freeTime=").append(freeTime);
        sb.append(", busyStandardAmount=").append(busyStandardAmount);
        sb.append(", notBusyStandardAmount=").append(notBusyStandardAmount);
        sb.append(", peakAmount=").append(peakAmount);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}